-- GENERATED SPELL FOR [Qiaga the Keeper] --


function spell0_7996(pUnit, Event) --@Renew,Heal--
pUnit:FullCastSpellOnTarget(11640,pUnit)
pUnit:RegisterEvent('Sorts_7996', 15000, 1)
end

function spell1_7996(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7996', 3000, 1)
end

function spell2_7996(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(11639,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7996', 18000, 1)
end

function Sorts_7996(pUnit, Event)
local choix_sorts_7996 = math.random(0, 2)
if choix_sorts_7996 == 0 then
pUnit:RegisterEvent('spell0_7996', 1, 1)
end
if choix_sorts_7996 == 1 then
pUnit:RegisterEvent('spell1_7996', 1, 1)
end
if choix_sorts_7996 == 2 then
pUnit:RegisterEvent('spell2_7996', 1, 1)
end
end

function mob7996_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7996', math.random(1500, 3000), 1)
end

function mob7996_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7996_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7996_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7996, 1, 'mob7996_Action')
RegisterUnitEvent(7996, 2, 'mob7996_Leave')
RegisterUnitEvent(7996, 3, 'mob7996_Kill')
RegisterUnitEvent(7996, 4, 'mob7996_Die')
